#coding:utf-8 
#http://butian.360.cn/Reward/pub
#主要是通过接口去获取数据

import requests
import json
import sys
import time
reload(sys)
sys.setdefaultencoding('utf-8') 


def getData(page_num):
	x = requests.post("http://butian.360.cn/Reward/pub", data={"s":1, "p":page_num})
	return x.content


def anlysisData(d):
	buf = []
	rs = json.loads(d)
	ys = rs['data']["list"]
	for i in ys:
		buf.append(i['company_name'])
	return buf



if __name__ == '__main__':
	#获取10页补天平台数据
	for x in range(1, 10):
		time.sleep(0.1)
		print "---",x,"---"
		for y in anlysisData(getData(x)):
			print y